home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Misc / InstallerNG / developer / gui / example / igui_Bye.c < prev    next >
C/C++ Source or Header  |  1999-10-31  |  2KB  |  81 lines

  1.  
  2. #include "includes.h"
  3. #include "installergui_data.h"
  4.  
  5. /********************************************************************
  6.  *
  7.  *  DESCRIPTION
  8.  *
  9.  */
  10.  
  11. /********************************************************************
  12.  *
  13.  *  STATIC
  14.  *
  15.  */
  16.  
  17. /********************************************************************
  18.  *
  19.  *  EXTERN
  20.  *
  21.  */
  22.  
  23. /********************************************************************
  24.  *
  25.  *  PUBLIC
  26.  *
  27.  */
  28.  
  29. /********************************************************************
  30.  *
  31.  *  CODE
  32.  *
  33.  */
  34.  
  35. void __asm igui_Bye(register __a0 APTR application,
  36.                     register __a1 char *appname,
  37.                     register __a2 char *defaultdest)
  38. {
  39.   #ifdef DEBUG
  40.   DEBUG_MAKRO
  41.   #endif
  42.  
  43.   {
  44.     struct Application *app = (struct Application *) application;
  45.     char *byetext;
  46.  
  47.     long args[4];
  48.     args[0] = (long) appname;
  49.     args[1] = (long) defaultdest;
  50.  
  51.     if (app->app_GlobalEnv[GENV_LOG] == LOG_FILE)
  52.     {
  53.       args[2] = (long) "\n\nInstallation log: ";
  54.       args[3] = app->app_GlobalEnv[GENV_LOGFILENAME];
  55.     }
  56.     else
  57.     {
  58.       args[2] = args[3] = (long) app->app_Texts[EMPTY];
  59.     }
  60.  
  61.     byetext = sav_StringF2(app->app_Texts[BYE], &args);
  62.     if (byetext)
  63.     {
  64.       // die button texte setzen
  65.       if (!app->app_SWING_Mode) { igui_NameCancel(app, (char *) app->app_GlobalEnv[GENV_ABORT_BUTTON]); }
  66.       igui_NameProceed(app, app->app_Texts[BUTTON_FINISH]);
  67.  
  68.       if (guistuff_NewContent(app, guistuff_InitSimpleText(byetext)))
  69.       {
  70.         igui_WaitApp(app);
  71.       }
  72.       else { /* NO GUI OBJECT */ }
  73.     }
  74.     else { /* OUT OF MEMORY */ }
  75.  
  76.     // done... leave with an empty panel
  77.     igui_EmptyPanel(app);
  78.   }
  79. }
  80.  
  81.